<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no">
    <script src="vue.min.js"></script>
</head>
<body>
<div id="app">

    <!--(item,i)与（val,key）一样效果-->
    <!--在括号中除了写vai，key以外，第三个位置可以写索引值-->
    <p v-for="(val,key,a) in list">值:{{val}}-------键:{{key}}------索引值:{{a}}</p>
    <hr/>
    <p v-for="(item,i) in list">值:{{item}}-------键:{{i}}</p>
</div>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            list: {
                id: '1',
                name: '张三1',
                xingbie:'男'
            },
            // {id:2,name:'张三2'},
            // {id:3,name:'张三3'},
            // {id:4,name:'张三4'},
            // {id:5,name:'张三5'},

        },
        method: {}
    })
</script>
</body>
</html>